namespace C1.Win.C1FlexGrid
{
    using C1.Win.C1FlexGrid.Util;
    using C1.Win.C1FlexGrid.Util.Styles;
    using System;
    using System.Drawing;

    internal class GridBorderDotted : Border
    {
        internal Color _color;

        public GridBorderDotted(Color color, int horz, int vert)
        {
            this._color = color;
            base._insets = new Margins(0, vert, 0, horz);
            base._brush = new SolidBrush(Color.LightGray);
        }

        public override void Render(Graphics g, Rectangle r)
        {
            if (base._insets.Bottom > 0)
            {
                g.FillRectangle(base._brush, r.X, r.Bottom - 1, r.Width, 1);
            }
            if (base._insets.Right > 0)
            {
                g.FillRectangle(base._brush, r.Right - 1, r.Y, 1, r.Height);
            }
        }
    }
}

